import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";

export class QueryAllPostsDto {
  @IsNotEmpty({ message: '当前页数不能为空'})
  @ApiProperty({ example: 1, description: '当前页数', default: 1 })
  readonly pageNo: number;

  @ApiProperty({ example: 20, description: '每页显示数量', required: false, default: 20 })
  readonly pageSize: number;

  @ApiProperty({ example: { sort: 'createdAt,desc' }, description: '排序参数', required: false})
  readonly params: any
}